@ECHO OFF

SET /p SQLSERVERNAME=Enter SQL Server name (SERVER_NAME\INSTANCE_NAME):
SET /p SQLUSERNAME=User name for SQL Authentication (leave blank for windows authentication):
 
IF NOT DEFINED SQLUSERNAME GOTO WINDOWSAUTH
 
:SQLAUTH
SET /p SQLPASSWORD=Password for SQL Authentication:
SQLCMD -S %SQLSERVERNAME% -i BizTalkReport.sql -U %SQLUSERNAME% -P %SQLPASSWORD%
GOTO END
 
:WINDOWSAUTH
SQLCMD -S %SQLSERVERNAME% -i BizTalkReport.sql

:END
PAUSE